custom: build with user supplied zlib. LIBS and INCLUDEPATH may need to be
set, e.g. LIBS+=... INCLUDEPATH+=...
+CONFIG+=disable-mappreview
+ This options disables the map preview feature. With the feature disabled
+ QtWebEngine and QtWebEngineWdigets are not used. Note that QtWebKit and
+ QtWebKitWidgets are not longer supported.
+
DOCVERSION=...
string appended to documentation location for www.gpsbabel.org. The default
value is the version string, e.g. "1.7.0". This is used by the gpsbabel.org
target, you are unlikely to need it unless you are maintaining
www.gpsbabel.org.
+
WEB=DIR
Path where the documentation will be stored for www.gpsbabel.org. This is
used by the gpsbabel.org target, you are unlikely to need it unless you are
#include <QNetworkRequest>
#include <QMessageBox>
#include <QNetworkAccessManager>
-#if HAVE_WEBENGINE
#include <QWebEngineView>
#include <QWebEnginePage>
#include <QWebChannel>
-#else
-#include <QWebView>
-#include <QWebFrame>
-#include <QWebPage>
-#endif
#include <QApplication>
#include <QCursor>
#include <QFile>
//------------------------------------------------------------------------
Map::Map(QWidget* parent,
const Gpx& gpx, QPlainTextEdit* te):
-#if HAVE_WEBENGINE
QWebEngineView(parent),
-#else
- QWebView(parent),
-#endif
gpx_(gpx),
mapPresent_(false),
busyCursor_(false),
this,SLOT(loadFinishedX(bool)));
this->logTime("Start map constructor");
-#if HAVE_WEBENGINE
auto* mclicker = new MarkerClicker(this);
auto* channel = new QWebChannel(this->page());
this->page()->setWebChannel(channel);
channel->registerObject(QStringLiteral("mclicker"), mclicker);
connect(mclicker, SIGNAL(markerClicked(int,int)), this, SLOT(markerClicked(int,int)));
connect(mclicker, SIGNAL(logTime(QString)), this, SLOT(logTime(QString)));
-#endif
// We search the following locations:
// 1. In the file system in the same directory as the executable.
//------------------------------------------------------------------------
void Map::showGpxData()
{
-
-#if !defined(HAVE_WEBENGINE)
- // Historically this was done here in showGpxData.
- MarkerClicker* mclicker = new MarkerClicker(this);
- this->page()->mainFrame()->addToJavaScriptWindowObject("mclicker", mclicker);
- connect(mclicker, SIGNAL(markerClicked(int,int)), this, SLOT(markerClicked(int,int)));
- connect(mclicker, SIGNAL(logTime(QString)), this, SLOT(logTime(QString)));
-#endif
-
this->logTime("Start defining JS string");
QStringList scriptStr;
scriptStr
//------------------------------------------------------------------------
void Map::resizeEvent(QResizeEvent* ev)
{
-#if HAVE_WEBENGINE
QWebEngineView::resizeEvent(ev);
-#else
- QWebView::resizeEvent(ev);
-#endif
if (mapPresent_) {
evaluateJS(QString("google.maps.event.trigger(map, 'resize');"));
}
*dbgout_ << s << '\n';
dbgout_->flush();
#endif
-#if HAVE_WEBENGINE
this->page()->runJavaScript(s);
-#else
- this->page()->mainFrame()->evaluateJavaScript(s);
-#endif
if (upd) {
this->update();
}